package net.ericaro.neojavagen.blocks;

/**
 * <b>CatchClause</b> ::= "catch" "(" <{@link net .ericaro .neojavagen .classes .FormalParameter FormalParameter}> ")" <
 * {@link net .ericaro .neojavagen .blocks .Block Block}>
 * 
 * @author eric@ericaro.net
 */
public class CatchClause extends net.ericaro.neojavagen.JavaPartComposition {
	private net.ericaro.neojavagen.blocks.Block block;

	private net.ericaro.neojavagen.classes.FormalParameter formalParameter;

	public CatchClause(net.ericaro.neojavagen.classes.FormalParameter formalParameter, net.ericaro.neojavagen.blocks.Block block) {
		super();
		this.formalParameter = formalParameter;
		this.block = block;
	}

	public net.ericaro.neojavagen.blocks.Block getBlock() {
		return block;
	}

	public net.ericaro.neojavagen.classes.FormalParameter getFormalParameter() {
		return formalParameter;
	}

	public void setBlock(net.ericaro.neojavagen.blocks.Block block) {
		this.block = block;
	}

	public void setFormalParameter(net.ericaro.neojavagen.classes.FormalParameter formalParameter) {
		this.formalParameter = formalParameter;
	}

	@Override
	public java.lang.String toString() {
		return print("catch", "(", formalParameter, ")", block);
	}
}
